package com.mcmaster.android.menus;

import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;
import com.mcmaster.android.Output;
import com.mcmaster.android.R;
import com.mcmaster.android.R.layout;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class ScavengerMenu extends MapActivity
{
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(layout.scavenger_layout_1);
		
		MapView mapView = (MapView) findViewById(R.id.mapview);
        mapView.setBuiltInZoomControls(true);
        
		Button scv_return_btn = (Button)findViewById(R.id.scv_return_btn);
		Button scv_scan_btn = (Button)findViewById(R.id.scv_scan_btn);
		
        scv_return_btn.setOnClickListener(new ButtonHandlerHomeMenu());
        scv_scan_btn.setOnClickListener(new ButtonHandlerScan());
	}
	
	private class ButtonHandlerHomeMenu implements View.OnClickListener {
	    public void onClick(View v) {
	    	handleHomeClick();
	    }
	}
	
	private class ButtonHandlerScan implements View.OnClickListener {
	    public void onClick(View v) {
	    	handleScanClick();
	    }
	}
	
	private void handleHomeClick()
	{
		finish();
	}
	
	private void handleScanClick()
	{
		startActivity(new Intent(this, Output.class));
	}
	
	@Override
	protected boolean isRouteDisplayed() {
		// TODO Auto-generated method stub
		return false;
	}
}
